#include"my_vector.hpp"

void test1()
{
	du::vector<int> v;
	v.push_back(1);
	v.push_back(2);
	v.push_back(2);
	v.push_back(4);
	v.push_back(5);
	v.push_back(6);
	v.push_back(6);
	for (int i = 0;i < v.size();i++)
	{
		du::vector<int>::iterator pos = v.begin();
		while (pos != v.end())
		{
			if (*pos % 2 == 0)
			{
				pos = v.erase(pos);
			}
			else
			{
				pos++;
			}
		}
	}
	for (int i : v)
	{
		std::cout << i << ' ';
	}
}

void test2()
{
	du::vector<std::string> v;
	v.push_back("aaa");
	v.push_back("bbb");
	v.push_back("ccc");
	v.resize(7, "ddd");
	for (auto& i : v)
	{
		std::cout << i << ' ';
	}
}

void test3()
{
	du::vector<int> v;
	v.push_back(1);
	v.push_back(1);
	v.push_back(1);
	v.push_back(1);
	v.push_back(1);
	v.push_back(1);
	du::vector<std::string> v1;
	v1.push_back("aaa");
	v1.push_back("bbb");
	v1.push_back("ccc");
	v1.resize(7, "ddd");
	du::vector<std::string> v2(5,"aaacv");
	v2 = v1;
	for (auto& i : v2)
	{
		std::cout << i << ' ';
	}
}

void test4()
{
	std::string s("abcdefg");
	du::vector<int> v(s.begin(), s.end());
	for (auto& i : v)
	{
		std::cout << i << ' ';
	}
}

void test5()
{
	du::vector<int> v(10, 1);
	for (auto& i : v)
	{
		std::cout << i << ' ';
	}
}
int main()
{
	test3();
	return 0;
}